chore(deps): update Native SDK to v0.13.5#2631
Conversation
fcedc65 to
f5e707b
Compare
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧Deps
Other
Other
🤖 This preview updates automatically when you update the PR. |
| @@ -1 +1 @@ | |||
| Subproject commit a35214dccd4e6ce0cef1b5818a8558b02f7a1eca | |||
| Subproject commit 6ebd29bd9742fd2f93b6770b5023e31a8efbc10e | |||
There was a problem hiding this comment.
Bug: The native SDK now enables metrics by default, but the EnableMetrics setting from the Unity configuration is not passed to the native layer, causing metrics to be collected unexpectedly.
Severity: HIGH
Suggested Fix
In SentryNativeBridge.cs, add a P/Invoke declaration for sentry_options_set_enable_metrics. Then, in the Init() method, call this new function with the value from options.EnableMetrics to ensure the Unity configuration is respected by the native SDK. For example: sentry_options_set_enable_metrics(cOptions, options.EnableMetrics ? 1 : 0);.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: modules/sentry-native#L1
Potential issue: The update to the native SDK (v0.13.5) changes the default behavior to
enable metrics. However, the Unity SDK's `SentryNativeBridge.cs` was not updated to
synchronize the `EnableMetrics` setting, which defaults to `false`, with the native
layer. As a result, even when users have metrics disabled in their Unity configuration,
the native SDK will collect and send them. This leads to unintended data collection,
which can affect performance and increase quota usage and costs for users on native
platforms like Windows, macOS, and Linux.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
True-ish, develop docs recently changed to state the default for metrics should be true, and this was applied to sentry-native but not Unity yet. The only metrics that we collect in Native are manual calls to the sentry_log_X API.
I'll check if we need to sync the setting though (and whether we want to auto-enable in Unity as well)
Bumps modules/sentry-native from 0.13.5-2-g814b822 to 0.13.5.
Auto-generated by a dependency updater.
Changelog
0.13.5
Features:
sentry_options_set_http_retry. (#1520).dmpfiles in the offline cache for direct debugger access. (#1607)sentry_options_set_enable_metrics(options, false). (#1609)Fixes:
WinHttpReceiveResponsefailures being silently ignored, which could cause envelopes to be lost instead of retried or cached. (#1620)googlesourcesubmodules with GitHub ones. (#1628)